package com.atmc;

import com.atmc.bean.Bill;
import com.atmc.bean.Supplier;
import com.atmc.mapper.BillMapper;
import com.atmc.mapper.SupplierMapper;
import com.atmc.service.BillService;
//import com.baomidou.mybatisplus.core.metadata.IPage;
//import com.baomidou.mybatisplus.core.metadata.OrderItem;
//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;

@SpringBootTest
public class MyTestApplication {
    @Autowired
    BillService billService;
    @Autowired
    BillMapper billMapper;
    @Autowired
    SupplierMapper supplierMapper;
    @Test
    public void test1(){
        List<Bill> bills = billService.selectAll();
        System.err.println(bills);
    }
    @Test
    public void test2(){
        Bill bill=new Bill(null,"兰考板蓝根","年",1000,10000,"兰考医药有限公司","付款",null);
        int insert = billService.insertOne(bill);
        System.err.println(insert);

    }
    @Test
    public void test3(){
        List<Supplier> suppliers = supplierMapper.selectAll();
        System.err.println(suppliers);
    }
//    @Test
//    public void test4(){
//        Page<Supplier> page=new Page(1,5);
//        supplierMapper.selectPage(page, null);
//        List<Supplier> list = page.getRecords();
////        List<Supplier> list = supplierIPage.getRecords();
//
//        System.err.println(list);
//    }
}
